<!doctype html>
<html>
<head>
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta charset="UTF-8" />
	<title>修改昵称</title>
	<link rel="stylesheet" type="text/css" href="css/personalData.css"/>
	<link rel="stylesheet" type="text/css" href="css/svg/font.css"/>
	<script sr='js/js.js'></script>
	<script type="text/javascript" src="js/jquery-2.1.4.min.js" ></script>
	<script type="text/javascript">
		window.onload = function() {
			document.documentElement.style.fontSize = document.documentElement.clientWidth / 320 * 20 + 'px';
			window.onresize = function() {
				document.documentElement.style.fontSize = document.documentElement.clientWidth / 320 * 20 + 'px';
			};
		};
	</script>
</head>
<body>
	<!--标题开始-->
	<header class='tbnc'>
		<a href="../1603B-taobao/personalData.html"><i class='icon-arrow-left2'></i></a>
		<a href="javascript:;">淘宝昵称</a>
		<img src='img/gengduoImg.jpg'>
	</header>
	<!--标题结束-->

	<!--内容开始-->
	<div class='nc'>
		<input type='text' placeholder="输入淘宝昵称" id="input"/>
		<span class='sp1'>1.此昵称非登录会员名，吧啦、Bin等社区场景显示</span>
		<span>2.与淘宝业务或卖家品牌冲突的昵称，淘宝有权回收</span>
	</div>
	<!--内容结束-->

	<!--底部开始-->
	<footer class='bc' id="baochun">
		保存
	</footer>
	<!--底部结束-->
</body>
<script>
	
			
		$("#baochun").click(function(){					
		var name=$("#input").val();					
			$.ajax({
				type: "post",
				url:"http://192.168.1.100/supermarket/data/user_update_name.php",
				async: true,
				data:{'user_name':name,'user_phone':localStorage.user_phone},
				
				dataType: 'jsonp', //使用jsop开始跨域
				jsonp: 'callback', //告诉后台，我需要一个回调函数
				jsonpCallback: "success_jsonpCallback", //回调函数的名称
				success: function(data) {
					//debugger;
					if (data.msg="success") {
						localStorage.name=name;					
							window.location.href="personalData.html";
                    
					} else{
						
					}
					},
			error: function(data) {

			}
		})
			})
	</script>












</html>